package com.example.mybatisplus.pageplus;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhouxl
 * @DATE 2020/10/12
 * @descriptoin
 */
@Component
public class PagePlusService {

    @Autowired
    private PagePlusMapper pagePlusMapper;

    /**
     * 测试自定义分页插件是否生效
     *
     * @return
     */
    public Object getUserByPage() {
        Map<String, Object> map = new HashMap<>();
        PageParams pageParams = new PageParams();
        pageParams.setPage(10);
        pageParams.setPageSize(10);
        pageParams.setUseFlag(true);
        pageParams.setCheckFlag(true);
        map.put("pageParams", pageParams);
        return pagePlusMapper.getUserByPage(map);
    }
}
